import type {BaseEntity} from "./model";

/** 登录接口参数 */
export interface LoginParams {
  password?: string;
  username?: string;
}

/** 登录接口返回值 */
export interface LoginResult {
  accessToken: string;
}

/** 刷新token返回值 */
export interface RefreshTokenResult {
  data: string;
  status: number;
}

/** 用户信息返回值 */
export interface UserInfoResult {
  [key: string]: any;

  permissions: string[];
  roles: string[];
  user?: UserResult;
}

// 用户信息
export interface UserResult extends BaseEntity {
  userId: number;
  deptId?: number;
  userName: string;
  nickName?: string;
  email?: string;
  phonenumber?: string;
  sex?: string;
  avatar?: string;
  password: string;
  status: string;
  delFlag: string;
  loginIp: string;
  loginDate: string;
  admin: boolean;
}
